@import url("https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900&display=swap");

* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

#menu-overlay {
  position: fixed;
  /* 铺满整个屏幕 */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* 设置背景颜色 */
  background-color: skyblue;
  display: flex;
  /* 对齐 */
  justify-content: center;
  align-items: center;

  overflow-y: auto;
  /* 正常状态隐藏起来，以缩放形式缩减，时间0.5s */
  transform: scale(0);
  transition: 0.5s;
}
#menu-overlay.active {
  /* 赋予active属性后就展开 */
  transform: scale(1);
}

#menu-overlay ul {
  position: relative;
}

#menu-overlay ul li {
  position: relative;
  list-style: none;
  text-align: center;
  display: block;
}

#menu-overlay ul li a {
  position: relative;
  text-decoration: none;
  font-size: 3.5em;
  padding: 0 10px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

#menu-overlay ul li a:before {
  /* 画一条线 */
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(179, 180, 195, 0.87);
  /* 鼠标离开就隐藏这条线 */
  transform: translateY(-50%) scaleX(0);
  transform-origin: right;
  transition: 0.5s transform;
}
#menu-overlay ul li a:hover:before {
  /* 鼠标在标签上就从左往右画线 */
  transform: translateY(-50%) scaleX(1);
  transform-origin: left;
  transition: 0.5s transform;
}

#toggleIcon {
  position: fixed;
  top: 100px;
  right: 0px;
  width: 50px;
  height: 50px;
  background-color: cornflowerblue;
  /* 设置图标大小 */
  font-size: 50px;
  /* 提高元素层级，这样当导航展开时仍然可以覆盖在其上面 */
  z-index: 1;
  /* 鼠标放在上面时显示是啥样子 */
  cursor: pointer;
}
